Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

PROPER(U63(X1, X2, X3, X4)) → PROPER(X4)
U111(mark(X1), X2, X3) → U111(X1, X2, X3)
ACTIVE(U51(X1, X2)) → ACTIVE(X1)
PROPER(U71(X1, X2)) → PROPER(X1)
ACTIVE(natsFrom(N)) → NATSFROM(s(N))
U711(mark(X1), X2) → U711(X1, X2)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U32(X1, X2)) → PROPER(X2)
PROPER(U52(X1, X2)) → U521(proper(X1), proper(X2))
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
ACTIVE(U12(tt, N, XS)) → SPLITAT(N, XS)
PROPER(U12(X1, X2, X3)) → PROPER(X3)
ACTIVE(afterNth(N, XS)) → U111(tt, N, XS)
ACTIVE(splitAt(0, XS)) → PAIR(nil, XS)
PROPER(U62(X1, X2, X3, X4)) → U621(proper(X1), proper(X2), proper(X3), proper(X4))
PROPER(U31(X1, X2)) → PROPER(X1)
SEL(ok(X1), ok(X2)) → SEL(X1, X2)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X2)
ACTIVE(U72(X1, X2)) → U721(active(X1), X2)
U811(mark(X1), X2, X3) → U811(X1, X2, X3)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X1)
FST(mark(X)) → FST(X)
ACTIVE(U62(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(snd(pair(X, Y))) → U511(tt, Y)
SND(ok(X)) → SND(X)
PROPER(U81(X1, X2, X3)) → PROPER(X3)
ACTIVE(U21(X1, X2)) → U211(active(X1), X2)
ACTIVE(U11(tt, N, XS)) → U121(tt, N, XS)
U311(mark(X1), X2) → U311(X1, X2)
U821(mark(X1), X2, X3) → U821(X1, X2, X3)
PROPER(U32(X1, X2)) → PROPER(X1)
ACTIVE(U82(X1, X2, X3)) → U821(active(X1), X2, X3)
PROPER(U82(X1, X2, X3)) → PROPER(X2)
ACTIVE(U32(X1, X2)) → ACTIVE(X1)
ACTIVE(U31(tt, N)) → U321(tt, N)
SND(mark(X)) → SND(X)
PROPER(splitAt(X1, X2)) → SPLITAT(proper(X1), proper(X2))
ACTIVE(tail(cons(N, XS))) → U711(tt, XS)
PROPER(natsFrom(X)) → NATSFROM(proper(X))
ACTIVE(U61(X1, X2, X3, X4)) → U611(active(X1), X2, X3, X4)
U811(ok(X1), ok(X2), ok(X3)) → U811(X1, X2, X3)
U421(ok(X1), ok(X2), ok(X3)) → U421(X1, X2, X3)
ACTIVE(tail(X)) → ACTIVE(X)
PROPER(U63(X1, X2, X3, X4)) → U631(proper(X1), proper(X2), proper(X3), proper(X4))
U711(ok(X1), ok(X2)) → U711(X1, X2)
ACTIVE(U63(tt, N, X, XS)) → SPLITAT(N, XS)
ACTIVE(U63(X1, X2, X3, X4)) → ACTIVE(X1)
S(ok(X)) → S(X)
PROPER(U22(X1, X2)) → U221(proper(X1), proper(X2))
PROPER(U64(X1, X2)) → PROPER(X2)
CONS(mark(X1), X2) → CONS(X1, X2)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X3)
ACTIVE(U71(X1, X2)) → U711(active(X1), X2)
PROPER(U41(X1, X2, X3)) → U411(proper(X1), proper(X2), proper(X3))
U631(ok(X1), ok(X2), ok(X3), ok(X4)) → U631(X1, X2, X3, X4)
PAIR(mark(X1), X2) → PAIR(X1, X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X2)
ACTIVE(U41(X1, X2, X3)) → U411(active(X1), X2, X3)
SPLITAT(mark(X1), X2) → SPLITAT(X1, X2)
ACTIVE(take(N, XS)) → U811(tt, N, XS)
FST(ok(X)) → FST(X)
PROPER(cons(X1, X2)) → PROPER(X1)
AFTERNTH(ok(X1), ok(X2)) → AFTERNTH(X1, X2)
ACTIVE(U12(X1, X2, X3)) → U121(active(X1), X2, X3)
ACTIVE(afterNth(X1, X2)) → AFTERNTH(X1, active(X2))
PROPER(U12(X1, X2, X3)) → PROPER(X2)
U311(ok(X1), ok(X2)) → U311(X1, X2)
ACTIVE(U11(X1, X2, X3)) → U111(active(X1), X2, X3)
U511(mark(X1), X2) → U511(X1, X2)
U621(mark(X1), X2, X3, X4) → U621(X1, X2, X3, X4)
S(mark(X)) → S(X)
PROPER(U12(X1, X2, X3)) → U121(proper(X1), proper(X2), proper(X3))
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
ACTIVE(U62(tt, N, X, XS)) → U631(tt, N, X, XS)
ACTIVE(snd(X)) → SND(active(X))
U641(mark(X1), X2) → U641(X1, X2)
PROPER(pair(X1, X2)) → PROPER(X1)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X1)
PROPER(natsFrom(X)) → PROPER(X)
ACTIVE(U11(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(U81(tt, N, XS)) → U821(tt, N, XS)
U721(ok(X1), ok(X2)) → U721(X1, X2)
ACTIVE(U64(pair(YS, ZS), X)) → CONS(X, YS)
PROPER(U64(X1, X2)) → U641(proper(X1), proper(X2))
ACTIVE(head(X)) → ACTIVE(X)
U511(ok(X1), ok(X2)) → U511(X1, X2)
ACTIVE(afterNth(X1, X2)) → AFTERNTH(active(X1), X2)
PROPER(U11(X1, X2, X3)) → U111(proper(X1), proper(X2), proper(X3))
ACTIVE(sel(X1, X2)) → SEL(active(X1), X2)
ACTIVE(pair(X1, X2)) → ACTIVE(X1)
U121(ok(X1), ok(X2), ok(X3)) → U121(X1, X2, X3)
ACTIVE(U64(X1, X2)) → U641(active(X1), X2)
ACTIVE(splitAt(X1, X2)) → SPLITAT(active(X1), X2)
PROPER(afterNth(X1, X2)) → AFTERNTH(proper(X1), proper(X2))
PROPER(head(X)) → PROPER(X)
PROPER(U72(X1, X2)) → PROPER(X1)
ACTIVE(U81(X1, X2, X3)) → U811(active(X1), X2, X3)
PROPER(U82(X1, X2, X3)) → U821(proper(X1), proper(X2), proper(X3))
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(U71(tt, XS)) → U721(tt, XS)
U631(mark(X1), X2, X3, X4) → U631(X1, X2, X3, X4)
PROPER(U21(X1, X2)) → PROPER(X1)
ACTIVE(U61(X1, X2, X3, X4)) → ACTIVE(X1)
PROPER(pair(X1, X2)) → PROPER(X2)
U611(mark(X1), X2, X3, X4) → U611(X1, X2, X3, X4)
NATSFROM(mark(X)) → NATSFROM(X)
TAIL(mark(X)) → TAIL(X)
ACTIVE(head(X)) → HEAD(active(X))
ACTIVE(U42(tt, N, XS)) → AFTERNTH(N, XS)
U621(ok(X1), ok(X2), ok(X3), ok(X4)) → U621(X1, X2, X3, X4)
SPLITAT(ok(X1), ok(X2)) → SPLITAT(X1, X2)
PROPER(snd(X)) → PROPER(X)
PROPER(U41(X1, X2, X3)) → PROPER(X2)
ACTIVE(U82(tt, N, XS)) → FST(splitAt(N, XS))
PROPER(U22(X1, X2)) → PROPER(X2)
ACTIVE(natsFrom(N)) → S(N)
SEL(mark(X1), X2) → SEL(X1, X2)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X1)
PROPER(take(X1, X2)) → TAKE(proper(X1), proper(X2))
ACTIVE(take(X1, X2)) → ACTIVE(X2)
ACTIVE(fst(pair(X, Y))) → U211(tt, X)
NATSFROM(ok(X)) → NATSFROM(X)
ACTIVE(sel(N, XS)) → U411(tt, N, XS)
PROPER(U82(X1, X2, X3)) → PROPER(X1)
SEL(X1, mark(X2)) → SEL(X1, X2)
ACTIVE(pair(X1, X2)) → PAIR(active(X1), X2)
U321(mark(X1), X2) → U321(X1, X2)
PROPER(afterNth(X1, X2)) → PROPER(X2)
TOP(ok(X)) → TOP(active(X))
U521(ok(X1), ok(X2)) → U521(X1, X2)
TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
PROPER(pair(X1, X2)) → PAIR(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(U41(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(splitAt(s(N), cons(X, XS))) → U611(tt, N, X, XS)
PROPER(splitAt(X1, X2)) → PROPER(X2)
ACTIVE(U41(tt, N, XS)) → U421(tt, N, XS)
PROPER(U81(X1, X2, X3)) → PROPER(X2)
ACTIVE(natsFrom(X)) → NATSFROM(active(X))
PROPER(U42(X1, X2, X3)) → PROPER(X1)
PROPER(U81(X1, X2, X3)) → PROPER(X1)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(U64(X1, X2)) → PROPER(X1)
PROPER(splitAt(X1, X2)) → PROPER(X1)
HEAD(ok(X)) → HEAD(X)
ACTIVE(s(X)) → S(active(X))
PROPER(fst(X)) → FST(proper(X))
PROPER(U51(X1, X2)) → PROPER(X2)
ACTIVE(fst(X)) → FST(active(X))
PROPER(U11(X1, X2, X3)) → PROPER(X3)
ACTIVE(take(X1, X2)) → TAKE(X1, active(X2))
PROPER(U61(X1, X2, X3, X4)) → U611(proper(X1), proper(X2), proper(X3), proper(X4))
U221(ok(X1), ok(X2)) → U221(X1, X2)
AFTERNTH(X1, mark(X2)) → AFTERNTH(X1, X2)
ACTIVE(U52(X1, X2)) → U521(active(X1), X2)
ACTIVE(U81(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
U211(mark(X1), X2) → U211(X1, X2)
U611(ok(X1), ok(X2), ok(X3), ok(X4)) → U611(X1, X2, X3, X4)
ACTIVE(U12(tt, N, XS)) → SND(splitAt(N, XS))
ACTIVE(U31(X1, X2)) → ACTIVE(X1)
ACTIVE(U42(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(snd(X)) → ACTIVE(X)
U641(ok(X1), ok(X2)) → U641(X1, X2)
U211(ok(X1), ok(X2)) → U211(X1, X2)
ACTIVE(U62(X1, X2, X3, X4)) → U621(active(X1), X2, X3, X4)
PROPER(sel(X1, X2)) → PROPER(X2)
ACTIVE(take(X1, X2)) → TAKE(active(X1), X2)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X2)
ACTIVE(U21(tt, X)) → U221(tt, X)
ACTIVE(U63(tt, N, X, XS)) → U641(splitAt(N, XS), X)
U111(ok(X1), ok(X2), ok(X3)) → U111(X1, X2, X3)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(U63(X1, X2, X3, X4)) → U631(active(X1), X2, X3, X4)
PROPER(fst(X)) → PROPER(X)
ACTIVE(U82(X1, X2, X3)) → ACTIVE(X1)
TOP(mark(X)) → PROPER(X)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X4)
U121(mark(X1), X2, X3) → U121(X1, X2, X3)
PROPER(U31(X1, X2)) → U311(proper(X1), proper(X2))
TOP(ok(X)) → ACTIVE(X)
U721(mark(X1), X2) → U721(X1, X2)
PROPER(tail(X)) → PROPER(X)
ACTIVE(fst(X)) → ACTIVE(X)
PROPER(afterNth(X1, X2)) → PROPER(X1)
U821(ok(X1), ok(X2), ok(X3)) → U821(X1, X2, X3)
U321(ok(X1), ok(X2)) → U321(X1, X2)
ACTIVE(natsFrom(X)) → ACTIVE(X)
ACTIVE(U22(X1, X2)) → ACTIVE(X1)
PROPER(head(X)) → HEAD(proper(X))
ACTIVE(U42(tt, N, XS)) → HEAD(afterNth(N, XS))
PROPER(U82(X1, X2, X3)) → PROPER(X3)
ACTIVE(U51(X1, X2)) → U511(active(X1), X2)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U51(X1, X2)) → PROPER(X1)
U411(ok(X1), ok(X2), ok(X3)) → U411(X1, X2, X3)
PROPER(U11(X1, X2, X3)) → PROPER(X2)
ACTIVE(U64(pair(YS, ZS), X)) → PAIR(cons(X, YS), ZS)
ACTIVE(splitAt(X1, X2)) → SPLITAT(X1, active(X2))
PROPER(U22(X1, X2)) → PROPER(X1)
PROPER(U42(X1, X2, X3)) → U421(proper(X1), proper(X2), proper(X3))
PROPER(U21(X1, X2)) → U211(proper(X1), proper(X2))
PROPER(U72(X1, X2)) → PROPER(X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X1)
U421(mark(X1), X2, X3) → U421(X1, X2, X3)
ACTIVE(U21(X1, X2)) → ACTIVE(X1)
ACTIVE(pair(X1, X2)) → PAIR(X1, active(X2))
PROPER(U61(X1, X2, X3, X4)) → PROPER(X2)
ACTIVE(U61(tt, N, X, XS)) → U621(tt, N, X, XS)
ACTIVE(U32(X1, X2)) → U321(active(X1), X2)
U411(mark(X1), X2, X3) → U411(X1, X2, X3)
HEAD(mark(X)) → HEAD(X)
PROPER(snd(X)) → SND(proper(X))
ACTIVE(U42(X1, X2, X3)) → U421(active(X1), X2, X3)
PAIR(ok(X1), ok(X2)) → PAIR(X1, X2)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(U72(X1, X2)) → U721(proper(X1), proper(X2))
ACTIVE(U72(X1, X2)) → ACTIVE(X1)
PROPER(U41(X1, X2, X3)) → PROPER(X1)
PROPER(U42(X1, X2, X3)) → PROPER(X3)
ACTIVE(U31(X1, X2)) → U311(active(X1), X2)
PROPER(sel(X1, X2)) → SEL(proper(X1), proper(X2))
ACTIVE(U22(X1, X2)) → U221(active(X1), X2)
PROPER(U41(X1, X2, X3)) → PROPER(X3)
PROPER(s(X)) → S(proper(X))
AFTERNTH(mark(X1), X2) → AFTERNTH(X1, X2)
PROPER(tail(X)) → TAIL(proper(X))
PROPER(U71(X1, X2)) → U711(proper(X1), proper(X2))
ACTIVE(afterNth(X1, X2)) → ACTIVE(X2)
ACTIVE(U51(tt, Y)) → U521(tt, Y)
ACTIVE(head(cons(N, XS))) → U311(tt, N)
ACTIVE(U12(X1, X2, X3)) → ACTIVE(X1)
PROPER(U42(X1, X2, X3)) → PROPER(X2)
PROPER(U52(X1, X2)) → PROPER(X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
PAIR(X1, mark(X2)) → PAIR(X1, X2)
ACTIVE(U82(tt, N, XS)) → SPLITAT(N, XS)
PROPER(U81(X1, X2, X3)) → U811(proper(X1), proper(X2), proper(X3))
ACTIVE(pair(X1, X2)) → ACTIVE(X2)
SPLITAT(X1, mark(X2)) → SPLITAT(X1, X2)
U221(mark(X1), X2) → U221(X1, X2)
PROPER(U12(X1, X2, X3)) → PROPER(X1)
PROPER(U52(X1, X2)) → PROPER(X1)
PROPER(U32(X1, X2)) → U321(proper(X1), proper(X2))
PROPER(s(X)) → PROPER(X)
TAIL(ok(X)) → TAIL(X)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X3)
ACTIVE(tail(X)) → TAIL(active(X))
U521(mark(X1), X2) → U521(X1, X2)
ACTIVE(sel(X1, X2)) → SEL(X1, active(X2))
ACTIVE(splitAt(X1, X2)) → ACTIVE(X2)
ACTIVE(U71(X1, X2)) → ACTIVE(X1)
PROPER(U31(X1, X2)) → PROPER(X2)
ACTIVE(U64(X1, X2)) → ACTIVE(X1)
PROPER(U71(X1, X2)) → PROPER(X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)
ACTIVE(U52(X1, X2)) → ACTIVE(X1)
PROPER(U11(X1, X2, X3)) → PROPER(X1)
PROPER(U51(X1, X2)) → U511(proper(X1), proper(X2))
PROPER(sel(X1, X2)) → PROPER(X1)
ACTIVE(natsFrom(N)) → CONS(N, natsFrom(s(N)))
TOP(mark(X)) → TOP(proper(X))
PROPER(U21(X1, X2)) → PROPER(X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

PROPER(U63(X1, X2, X3, X4)) → PROPER(X4)
U111(mark(X1), X2, X3) → U111(X1, X2, X3)
ACTIVE(U51(X1, X2)) → ACTIVE(X1)
PROPER(U71(X1, X2)) → PROPER(X1)
ACTIVE(natsFrom(N)) → NATSFROM(s(N))
U711(mark(X1), X2) → U711(X1, X2)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U32(X1, X2)) → PROPER(X2)
PROPER(U52(X1, X2)) → U521(proper(X1), proper(X2))
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
ACTIVE(U12(tt, N, XS)) → SPLITAT(N, XS)
PROPER(U12(X1, X2, X3)) → PROPER(X3)
ACTIVE(afterNth(N, XS)) → U111(tt, N, XS)
ACTIVE(splitAt(0, XS)) → PAIR(nil, XS)
PROPER(U62(X1, X2, X3, X4)) → U621(proper(X1), proper(X2), proper(X3), proper(X4))
PROPER(U31(X1, X2)) → PROPER(X1)
SEL(ok(X1), ok(X2)) → SEL(X1, X2)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X2)
ACTIVE(U72(X1, X2)) → U721(active(X1), X2)
U811(mark(X1), X2, X3) → U811(X1, X2, X3)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X1)
FST(mark(X)) → FST(X)
ACTIVE(U62(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(snd(pair(X, Y))) → U511(tt, Y)
SND(ok(X)) → SND(X)
PROPER(U81(X1, X2, X3)) → PROPER(X3)
ACTIVE(U21(X1, X2)) → U211(active(X1), X2)
ACTIVE(U11(tt, N, XS)) → U121(tt, N, XS)
U311(mark(X1), X2) → U311(X1, X2)
U821(mark(X1), X2, X3) → U821(X1, X2, X3)
PROPER(U32(X1, X2)) → PROPER(X1)
ACTIVE(U82(X1, X2, X3)) → U821(active(X1), X2, X3)
PROPER(U82(X1, X2, X3)) → PROPER(X2)
ACTIVE(U32(X1, X2)) → ACTIVE(X1)
ACTIVE(U31(tt, N)) → U321(tt, N)
SND(mark(X)) → SND(X)
PROPER(splitAt(X1, X2)) → SPLITAT(proper(X1), proper(X2))
ACTIVE(tail(cons(N, XS))) → U711(tt, XS)
PROPER(natsFrom(X)) → NATSFROM(proper(X))
ACTIVE(U61(X1, X2, X3, X4)) → U611(active(X1), X2, X3, X4)
U811(ok(X1), ok(X2), ok(X3)) → U811(X1, X2, X3)
U421(ok(X1), ok(X2), ok(X3)) → U421(X1, X2, X3)
ACTIVE(tail(X)) → ACTIVE(X)
PROPER(U63(X1, X2, X3, X4)) → U631(proper(X1), proper(X2), proper(X3), proper(X4))
U711(ok(X1), ok(X2)) → U711(X1, X2)
ACTIVE(U63(tt, N, X, XS)) → SPLITAT(N, XS)
ACTIVE(U63(X1, X2, X3, X4)) → ACTIVE(X1)
S(ok(X)) → S(X)
PROPER(U22(X1, X2)) → U221(proper(X1), proper(X2))
PROPER(U64(X1, X2)) → PROPER(X2)
CONS(mark(X1), X2) → CONS(X1, X2)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X3)
ACTIVE(U71(X1, X2)) → U711(active(X1), X2)
PROPER(U41(X1, X2, X3)) → U411(proper(X1), proper(X2), proper(X3))
U631(ok(X1), ok(X2), ok(X3), ok(X4)) → U631(X1, X2, X3, X4)
PAIR(mark(X1), X2) → PAIR(X1, X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X2)
ACTIVE(U41(X1, X2, X3)) → U411(active(X1), X2, X3)
SPLITAT(mark(X1), X2) → SPLITAT(X1, X2)
ACTIVE(take(N, XS)) → U811(tt, N, XS)
FST(ok(X)) → FST(X)
PROPER(cons(X1, X2)) → PROPER(X1)
AFTERNTH(ok(X1), ok(X2)) → AFTERNTH(X1, X2)
ACTIVE(U12(X1, X2, X3)) → U121(active(X1), X2, X3)
ACTIVE(afterNth(X1, X2)) → AFTERNTH(X1, active(X2))
PROPER(U12(X1, X2, X3)) → PROPER(X2)
U311(ok(X1), ok(X2)) → U311(X1, X2)
ACTIVE(U11(X1, X2, X3)) → U111(active(X1), X2, X3)
U511(mark(X1), X2) → U511(X1, X2)
U621(mark(X1), X2, X3, X4) → U621(X1, X2, X3, X4)
S(mark(X)) → S(X)
PROPER(U12(X1, X2, X3)) → U121(proper(X1), proper(X2), proper(X3))
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
ACTIVE(U62(tt, N, X, XS)) → U631(tt, N, X, XS)
ACTIVE(snd(X)) → SND(active(X))
U641(mark(X1), X2) → U641(X1, X2)
PROPER(pair(X1, X2)) → PROPER(X1)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X1)
PROPER(natsFrom(X)) → PROPER(X)
ACTIVE(U11(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(U81(tt, N, XS)) → U821(tt, N, XS)
U721(ok(X1), ok(X2)) → U721(X1, X2)
ACTIVE(U64(pair(YS, ZS), X)) → CONS(X, YS)
PROPER(U64(X1, X2)) → U641(proper(X1), proper(X2))
ACTIVE(head(X)) → ACTIVE(X)
U511(ok(X1), ok(X2)) → U511(X1, X2)
ACTIVE(afterNth(X1, X2)) → AFTERNTH(active(X1), X2)
PROPER(U11(X1, X2, X3)) → U111(proper(X1), proper(X2), proper(X3))
ACTIVE(sel(X1, X2)) → SEL(active(X1), X2)
ACTIVE(pair(X1, X2)) → ACTIVE(X1)
U121(ok(X1), ok(X2), ok(X3)) → U121(X1, X2, X3)
ACTIVE(U64(X1, X2)) → U641(active(X1), X2)
ACTIVE(splitAt(X1, X2)) → SPLITAT(active(X1), X2)
PROPER(afterNth(X1, X2)) → AFTERNTH(proper(X1), proper(X2))
PROPER(head(X)) → PROPER(X)
PROPER(U72(X1, X2)) → PROPER(X1)
ACTIVE(U81(X1, X2, X3)) → U811(active(X1), X2, X3)
PROPER(U82(X1, X2, X3)) → U821(proper(X1), proper(X2), proper(X3))
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(U71(tt, XS)) → U721(tt, XS)
U631(mark(X1), X2, X3, X4) → U631(X1, X2, X3, X4)
PROPER(U21(X1, X2)) → PROPER(X1)
ACTIVE(U61(X1, X2, X3, X4)) → ACTIVE(X1)
PROPER(pair(X1, X2)) → PROPER(X2)
U611(mark(X1), X2, X3, X4) → U611(X1, X2, X3, X4)
NATSFROM(mark(X)) → NATSFROM(X)
TAIL(mark(X)) → TAIL(X)
ACTIVE(head(X)) → HEAD(active(X))
ACTIVE(U42(tt, N, XS)) → AFTERNTH(N, XS)
U621(ok(X1), ok(X2), ok(X3), ok(X4)) → U621(X1, X2, X3, X4)
SPLITAT(ok(X1), ok(X2)) → SPLITAT(X1, X2)
PROPER(snd(X)) → PROPER(X)
PROPER(U41(X1, X2, X3)) → PROPER(X2)
ACTIVE(U82(tt, N, XS)) → FST(splitAt(N, XS))
PROPER(U22(X1, X2)) → PROPER(X2)
ACTIVE(natsFrom(N)) → S(N)
SEL(mark(X1), X2) → SEL(X1, X2)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X1)
PROPER(take(X1, X2)) → TAKE(proper(X1), proper(X2))
ACTIVE(take(X1, X2)) → ACTIVE(X2)
ACTIVE(fst(pair(X, Y))) → U211(tt, X)
NATSFROM(ok(X)) → NATSFROM(X)
ACTIVE(sel(N, XS)) → U411(tt, N, XS)
PROPER(U82(X1, X2, X3)) → PROPER(X1)
SEL(X1, mark(X2)) → SEL(X1, X2)
ACTIVE(pair(X1, X2)) → PAIR(active(X1), X2)
U321(mark(X1), X2) → U321(X1, X2)
PROPER(afterNth(X1, X2)) → PROPER(X2)
TOP(ok(X)) → TOP(active(X))
U521(ok(X1), ok(X2)) → U521(X1, X2)
TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
PROPER(pair(X1, X2)) → PAIR(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(U41(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(splitAt(s(N), cons(X, XS))) → U611(tt, N, X, XS)
PROPER(splitAt(X1, X2)) → PROPER(X2)
ACTIVE(U41(tt, N, XS)) → U421(tt, N, XS)
PROPER(U81(X1, X2, X3)) → PROPER(X2)
ACTIVE(natsFrom(X)) → NATSFROM(active(X))
PROPER(U42(X1, X2, X3)) → PROPER(X1)
PROPER(U81(X1, X2, X3)) → PROPER(X1)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(U64(X1, X2)) → PROPER(X1)
PROPER(splitAt(X1, X2)) → PROPER(X1)
HEAD(ok(X)) → HEAD(X)
ACTIVE(s(X)) → S(active(X))
PROPER(fst(X)) → FST(proper(X))
PROPER(U51(X1, X2)) → PROPER(X2)
ACTIVE(fst(X)) → FST(active(X))
PROPER(U11(X1, X2, X3)) → PROPER(X3)
ACTIVE(take(X1, X2)) → TAKE(X1, active(X2))
PROPER(U61(X1, X2, X3, X4)) → U611(proper(X1), proper(X2), proper(X3), proper(X4))
U221(ok(X1), ok(X2)) → U221(X1, X2)
AFTERNTH(X1, mark(X2)) → AFTERNTH(X1, X2)
ACTIVE(U52(X1, X2)) → U521(active(X1), X2)
ACTIVE(U81(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
U211(mark(X1), X2) → U211(X1, X2)
U611(ok(X1), ok(X2), ok(X3), ok(X4)) → U611(X1, X2, X3, X4)
ACTIVE(U12(tt, N, XS)) → SND(splitAt(N, XS))
ACTIVE(U31(X1, X2)) → ACTIVE(X1)
ACTIVE(U42(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(snd(X)) → ACTIVE(X)
U641(ok(X1), ok(X2)) → U641(X1, X2)
U211(ok(X1), ok(X2)) → U211(X1, X2)
ACTIVE(U62(X1, X2, X3, X4)) → U621(active(X1), X2, X3, X4)
PROPER(sel(X1, X2)) → PROPER(X2)
ACTIVE(take(X1, X2)) → TAKE(active(X1), X2)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X2)
ACTIVE(U21(tt, X)) → U221(tt, X)
ACTIVE(U63(tt, N, X, XS)) → U641(splitAt(N, XS), X)
U111(ok(X1), ok(X2), ok(X3)) → U111(X1, X2, X3)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(U63(X1, X2, X3, X4)) → U631(active(X1), X2, X3, X4)
PROPER(fst(X)) → PROPER(X)
ACTIVE(U82(X1, X2, X3)) → ACTIVE(X1)
TOP(mark(X)) → PROPER(X)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X4)
U121(mark(X1), X2, X3) → U121(X1, X2, X3)
PROPER(U31(X1, X2)) → U311(proper(X1), proper(X2))
TOP(ok(X)) → ACTIVE(X)
U721(mark(X1), X2) → U721(X1, X2)
PROPER(tail(X)) → PROPER(X)
ACTIVE(fst(X)) → ACTIVE(X)
PROPER(afterNth(X1, X2)) → PROPER(X1)
U821(ok(X1), ok(X2), ok(X3)) → U821(X1, X2, X3)
U321(ok(X1), ok(X2)) → U321(X1, X2)
ACTIVE(natsFrom(X)) → ACTIVE(X)
ACTIVE(U22(X1, X2)) → ACTIVE(X1)
PROPER(head(X)) → HEAD(proper(X))
ACTIVE(U42(tt, N, XS)) → HEAD(afterNth(N, XS))
PROPER(U82(X1, X2, X3)) → PROPER(X3)
ACTIVE(U51(X1, X2)) → U511(active(X1), X2)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U51(X1, X2)) → PROPER(X1)
U411(ok(X1), ok(X2), ok(X3)) → U411(X1, X2, X3)
PROPER(U11(X1, X2, X3)) → PROPER(X2)
ACTIVE(U64(pair(YS, ZS), X)) → PAIR(cons(X, YS), ZS)
ACTIVE(splitAt(X1, X2)) → SPLITAT(X1, active(X2))
PROPER(U22(X1, X2)) → PROPER(X1)
PROPER(U42(X1, X2, X3)) → U421(proper(X1), proper(X2), proper(X3))
PROPER(U21(X1, X2)) → U211(proper(X1), proper(X2))
PROPER(U72(X1, X2)) → PROPER(X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X1)
U421(mark(X1), X2, X3) → U421(X1, X2, X3)
ACTIVE(U21(X1, X2)) → ACTIVE(X1)
ACTIVE(pair(X1, X2)) → PAIR(X1, active(X2))
PROPER(U61(X1, X2, X3, X4)) → PROPER(X2)
ACTIVE(U61(tt, N, X, XS)) → U621(tt, N, X, XS)
ACTIVE(U32(X1, X2)) → U321(active(X1), X2)
U411(mark(X1), X2, X3) → U411(X1, X2, X3)
HEAD(mark(X)) → HEAD(X)
PROPER(snd(X)) → SND(proper(X))
ACTIVE(U42(X1, X2, X3)) → U421(active(X1), X2, X3)
PAIR(ok(X1), ok(X2)) → PAIR(X1, X2)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(U72(X1, X2)) → U721(proper(X1), proper(X2))
ACTIVE(U72(X1, X2)) → ACTIVE(X1)
PROPER(U41(X1, X2, X3)) → PROPER(X1)
PROPER(U42(X1, X2, X3)) → PROPER(X3)
ACTIVE(U31(X1, X2)) → U311(active(X1), X2)
PROPER(sel(X1, X2)) → SEL(proper(X1), proper(X2))
ACTIVE(U22(X1, X2)) → U221(active(X1), X2)
PROPER(U41(X1, X2, X3)) → PROPER(X3)
PROPER(s(X)) → S(proper(X))
AFTERNTH(mark(X1), X2) → AFTERNTH(X1, X2)
PROPER(tail(X)) → TAIL(proper(X))
PROPER(U71(X1, X2)) → U711(proper(X1), proper(X2))
ACTIVE(afterNth(X1, X2)) → ACTIVE(X2)
ACTIVE(U51(tt, Y)) → U521(tt, Y)
ACTIVE(head(cons(N, XS))) → U311(tt, N)
ACTIVE(U12(X1, X2, X3)) → ACTIVE(X1)
PROPER(U42(X1, X2, X3)) → PROPER(X2)
PROPER(U52(X1, X2)) → PROPER(X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
PAIR(X1, mark(X2)) → PAIR(X1, X2)
ACTIVE(U82(tt, N, XS)) → SPLITAT(N, XS)
PROPER(U81(X1, X2, X3)) → U811(proper(X1), proper(X2), proper(X3))
ACTIVE(pair(X1, X2)) → ACTIVE(X2)
SPLITAT(X1, mark(X2)) → SPLITAT(X1, X2)
U221(mark(X1), X2) → U221(X1, X2)
PROPER(U12(X1, X2, X3)) → PROPER(X1)
PROPER(U52(X1, X2)) → PROPER(X1)
PROPER(U32(X1, X2)) → U321(proper(X1), proper(X2))
PROPER(s(X)) → PROPER(X)
TAIL(ok(X)) → TAIL(X)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X3)
ACTIVE(tail(X)) → TAIL(active(X))
U521(mark(X1), X2) → U521(X1, X2)
ACTIVE(sel(X1, X2)) → SEL(X1, active(X2))
ACTIVE(splitAt(X1, X2)) → ACTIVE(X2)
ACTIVE(U71(X1, X2)) → ACTIVE(X1)
PROPER(U31(X1, X2)) → PROPER(X2)
ACTIVE(U64(X1, X2)) → ACTIVE(X1)
PROPER(U71(X1, X2)) → PROPER(X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)
ACTIVE(U52(X1, X2)) → ACTIVE(X1)
PROPER(U11(X1, X2, X3)) → PROPER(X1)
PROPER(U51(X1, X2)) → U511(proper(X1), proper(X2))
PROPER(sel(X1, X2)) → PROPER(X1)
ACTIVE(natsFrom(N)) → CONS(N, natsFrom(s(N)))
TOP(mark(X)) → TOP(proper(X))
PROPER(U21(X1, X2)) → PROPER(X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 33 SCCs with 98 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAIL(ok(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAIL(ok(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(mark(X1), X2) → SEL(X1, X2)
SEL(ok(X1), ok(X2)) → SEL(X1, X2)
SEL(X1, mark(X2)) → SEL(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(mark(X1), X2) → SEL(X1, X2)
SEL(ok(X1), ok(X2)) → SEL(X1, X2)
SEL(X1, mark(X2)) → SEL(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

NATSFROM(ok(X)) → NATSFROM(X)
NATSFROM(mark(X)) → NATSFROM(X)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

NATSFROM(ok(X)) → NATSFROM(X)
NATSFROM(mark(X)) → NATSFROM(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FST(ok(X)) → FST(X)
FST(mark(X)) → FST(X)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FST(ok(X)) → FST(X)
FST(mark(X)) → FST(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U821(ok(X1), ok(X2), ok(X3)) → U821(X1, X2, X3)
U821(mark(X1), X2, X3) → U821(X1, X2, X3)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U821(ok(X1), ok(X2), ok(X3)) → U821(X1, X2, X3)
U821(mark(X1), X2, X3) → U821(X1, X2, X3)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U811(mark(X1), X2, X3) → U811(X1, X2, X3)
U811(ok(X1), ok(X2), ok(X3)) → U811(X1, X2, X3)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U811(mark(X1), X2, X3) → U811(X1, X2, X3)
U811(ok(X1), ok(X2), ok(X3)) → U811(X1, X2, X3)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U721(ok(X1), ok(X2)) → U721(X1, X2)
U721(mark(X1), X2) → U721(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U721(ok(X1), ok(X2)) → U721(X1, X2)
U721(mark(X1), X2) → U721(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U711(mark(X1), X2) → U711(X1, X2)
U711(ok(X1), ok(X2)) → U711(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U711(mark(X1), X2) → U711(X1, X2)
U711(ok(X1), ok(X2)) → U711(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PAIR(ok(X1), ok(X2)) → PAIR(X1, X2)
PAIR(mark(X1), X2) → PAIR(X1, X2)
PAIR(X1, mark(X2)) → PAIR(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PAIR(ok(X1), ok(X2)) → PAIR(X1, X2)
PAIR(mark(X1), X2) → PAIR(X1, X2)
PAIR(X1, mark(X2)) → PAIR(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U641(ok(X1), ok(X2)) → U641(X1, X2)
U641(mark(X1), X2) → U641(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U641(ok(X1), ok(X2)) → U641(X1, X2)
U641(mark(X1), X2) → U641(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U631(ok(X1), ok(X2), ok(X3), ok(X4)) → U631(X1, X2, X3, X4)
U631(mark(X1), X2, X3, X4) → U631(X1, X2, X3, X4)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U631(ok(X1), ok(X2), ok(X3), ok(X4)) → U631(X1, X2, X3, X4)
U631(mark(X1), X2, X3, X4) → U631(X1, X2, X3, X4)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U621(ok(X1), ok(X2), ok(X3), ok(X4)) → U621(X1, X2, X3, X4)
U621(mark(X1), X2, X3, X4) → U621(X1, X2, X3, X4)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U621(ok(X1), ok(X2), ok(X3), ok(X4)) → U621(X1, X2, X3, X4)
U621(mark(X1), X2, X3, X4) → U621(X1, X2, X3, X4)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U611(mark(X1), X2, X3, X4) → U611(X1, X2, X3, X4)
U611(ok(X1), ok(X2), ok(X3), ok(X4)) → U611(X1, X2, X3, X4)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U611(mark(X1), X2, X3, X4) → U611(X1, X2, X3, X4)
U611(ok(X1), ok(X2), ok(X3), ok(X4)) → U611(X1, X2, X3, X4)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U521(mark(X1), X2) → U521(X1, X2)
U521(ok(X1), ok(X2)) → U521(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U521(mark(X1), X2) → U521(X1, X2)
U521(ok(X1), ok(X2)) → U521(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U511(ok(X1), ok(X2)) → U511(X1, X2)
U511(mark(X1), X2) → U511(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U511(ok(X1), ok(X2)) → U511(X1, X2)
U511(mark(X1), X2) → U511(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AFTERNTH(ok(X1), ok(X2)) → AFTERNTH(X1, X2)
AFTERNTH(mark(X1), X2) → AFTERNTH(X1, X2)
AFTERNTH(X1, mark(X2)) → AFTERNTH(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AFTERNTH(ok(X1), ok(X2)) → AFTERNTH(X1, X2)
AFTERNTH(mark(X1), X2) → AFTERNTH(X1, X2)
AFTERNTH(X1, mark(X2)) → AFTERNTH(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HEAD(mark(X)) → HEAD(X)
HEAD(ok(X)) → HEAD(X)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HEAD(mark(X)) → HEAD(X)
HEAD(ok(X)) → HEAD(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U421(mark(X1), X2, X3) → U421(X1, X2, X3)
U421(ok(X1), ok(X2), ok(X3)) → U421(X1, X2, X3)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U421(mark(X1), X2, X3) → U421(X1, X2, X3)
U421(ok(X1), ok(X2), ok(X3)) → U421(X1, X2, X3)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U411(ok(X1), ok(X2), ok(X3)) → U411(X1, X2, X3)
U411(mark(X1), X2, X3) → U411(X1, X2, X3)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U411(ok(X1), ok(X2), ok(X3)) → U411(X1, X2, X3)
U411(mark(X1), X2, X3) → U411(X1, X2, X3)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U321(ok(X1), ok(X2)) → U321(X1, X2)
U321(mark(X1), X2) → U321(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U321(ok(X1), ok(X2)) → U321(X1, X2)
U321(mark(X1), X2) → U321(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U311(mark(X1), X2) → U311(X1, X2)
U311(ok(X1), ok(X2)) → U311(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U311(mark(X1), X2) → U311(X1, X2)
U311(ok(X1), ok(X2)) → U311(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U221(mark(X1), X2) → U221(X1, X2)
U221(ok(X1), ok(X2)) → U221(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U221(mark(X1), X2) → U221(X1, X2)
U221(ok(X1), ok(X2)) → U221(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U211(ok(X1), ok(X2)) → U211(X1, X2)
U211(mark(X1), X2) → U211(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U211(ok(X1), ok(X2)) → U211(X1, X2)
U211(mark(X1), X2) → U211(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(X1, mark(X2)) → SPLITAT(X1, X2)
SPLITAT(mark(X1), X2) → SPLITAT(X1, X2)
SPLITAT(ok(X1), ok(X2)) → SPLITAT(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(X1, mark(X2)) → SPLITAT(X1, X2)
SPLITAT(mark(X1), X2) → SPLITAT(X1, X2)
SPLITAT(ok(X1), ok(X2)) → SPLITAT(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SND(mark(X)) → SND(X)
SND(ok(X)) → SND(X)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SND(mark(X)) → SND(X)
SND(ok(X)) → SND(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U121(ok(X1), ok(X2), ok(X3)) → U121(X1, X2, X3)
U121(mark(X1), X2, X3) → U121(X1, X2, X3)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U121(ok(X1), ok(X2), ok(X3)) → U121(X1, X2, X3)
U121(mark(X1), X2, X3) → U121(X1, X2, X3)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U111(mark(X1), X2, X3) → U111(X1, X2, X3)
U111(ok(X1), ok(X2), ok(X3)) → U111(X1, X2, X3)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U111(mark(X1), X2, X3) → U111(X1, X2, X3)
U111(ok(X1), ok(X2), ok(X3)) → U111(X1, X2, X3)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(U63(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U71(X1, X2)) → PROPER(X1)
PROPER(U51(X1, X2)) → PROPER(X2)
PROPER(U72(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2, X3)) → PROPER(X3)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U32(X1, X2)) → PROPER(X2)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X2)
PROPER(head(X)) → PROPER(X)
PROPER(U12(X1, X2, X3)) → PROPER(X3)
PROPER(U72(X1, X2)) → PROPER(X1)
PROPER(U31(X1, X2)) → PROPER(X1)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(U81(X1, X2, X3)) → PROPER(X3)
PROPER(U42(X1, X2, X3)) → PROPER(X3)
PROPER(U41(X1, X2, X3)) → PROPER(X1)
PROPER(U21(X1, X2)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X2)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U41(X1, X2, X3)) → PROPER(X3)
PROPER(U32(X1, X2)) → PROPER(X1)
PROPER(pair(X1, X2)) → PROPER(X2)
PROPER(U82(X1, X2, X3)) → PROPER(X2)
PROPER(U42(X1, X2, X3)) → PROPER(X2)
PROPER(U52(X1, X2)) → PROPER(X2)
PROPER(U41(X1, X2, X3)) → PROPER(X2)
PROPER(snd(X)) → PROPER(X)
PROPER(U22(X1, X2)) → PROPER(X2)
PROPER(fst(X)) → PROPER(X)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U64(X1, X2)) → PROPER(X2)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U12(X1, X2, X3)) → PROPER(X1)
PROPER(U52(X1, X2)) → PROPER(X1)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U82(X1, X2, X3)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(tail(X)) → PROPER(X)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2, X3)) → PROPER(X2)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X3)
PROPER(afterNth(X1, X2)) → PROPER(X1)
PROPER(afterNth(X1, X2)) → PROPER(X2)
PROPER(pair(X1, X2)) → PROPER(X1)
PROPER(U31(X1, X2)) → PROPER(X2)
PROPER(splitAt(X1, X2)) → PROPER(X2)
PROPER(U82(X1, X2, X3)) → PROPER(X3)
PROPER(U81(X1, X2, X3)) → PROPER(X2)
PROPER(U71(X1, X2)) → PROPER(X2)
PROPER(natsFrom(X)) → PROPER(X)
PROPER(U42(X1, X2, X3)) → PROPER(X1)
PROPER(U81(X1, X2, X3)) → PROPER(X1)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U51(X1, X2)) → PROPER(X1)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2, X3)) → PROPER(X2)
PROPER(U64(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2, X3)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X1)
PROPER(splitAt(X1, X2)) → PROPER(X1)
PROPER(U21(X1, X2)) → PROPER(X2)
PROPER(U22(X1, X2)) → PROPER(X1)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(U63(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U71(X1, X2)) → PROPER(X1)
PROPER(U51(X1, X2)) → PROPER(X2)
PROPER(U72(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2, X3)) → PROPER(X3)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U32(X1, X2)) → PROPER(X2)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X2)
PROPER(head(X)) → PROPER(X)
PROPER(U12(X1, X2, X3)) → PROPER(X3)
PROPER(U72(X1, X2)) → PROPER(X1)
PROPER(U31(X1, X2)) → PROPER(X1)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(U81(X1, X2, X3)) → PROPER(X3)
PROPER(U41(X1, X2, X3)) → PROPER(X1)
PROPER(U42(X1, X2, X3)) → PROPER(X3)
PROPER(U21(X1, X2)) → PROPER(X1)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X2)
PROPER(sel(X1, X2)) → PROPER(X2)
PROPER(U32(X1, X2)) → PROPER(X1)
PROPER(U41(X1, X2, X3)) → PROPER(X3)
PROPER(pair(X1, X2)) → PROPER(X2)
PROPER(U82(X1, X2, X3)) → PROPER(X2)
PROPER(U42(X1, X2, X3)) → PROPER(X2)
PROPER(U52(X1, X2)) → PROPER(X2)
PROPER(U41(X1, X2, X3)) → PROPER(X2)
PROPER(snd(X)) → PROPER(X)
PROPER(U22(X1, X2)) → PROPER(X2)
PROPER(fst(X)) → PROPER(X)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X1)
PROPER(U64(X1, X2)) → PROPER(X2)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X3)
PROPER(U12(X1, X2, X3)) → PROPER(X1)
PROPER(U52(X1, X2)) → PROPER(X1)
PROPER(U62(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U82(X1, X2, X3)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(tail(X)) → PROPER(X)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2, X3)) → PROPER(X2)
PROPER(U63(X1, X2, X3, X4)) → PROPER(X3)
PROPER(afterNth(X1, X2)) → PROPER(X1)
PROPER(afterNth(X1, X2)) → PROPER(X2)
PROPER(pair(X1, X2)) → PROPER(X1)
PROPER(U31(X1, X2)) → PROPER(X2)
PROPER(splitAt(X1, X2)) → PROPER(X2)
PROPER(U71(X1, X2)) → PROPER(X2)
PROPER(U81(X1, X2, X3)) → PROPER(X2)
PROPER(U82(X1, X2, X3)) → PROPER(X3)
PROPER(natsFrom(X)) → PROPER(X)
PROPER(U42(X1, X2, X3)) → PROPER(X1)
PROPER(U81(X1, X2, X3)) → PROPER(X1)
PROPER(U61(X1, X2, X3, X4)) → PROPER(X4)
PROPER(U51(X1, X2)) → PROPER(X1)
PROPER(U64(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2, X3)) → PROPER(X2)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2, X3)) → PROPER(X1)
PROPER(splitAt(X1, X2)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X1)
PROPER(U21(X1, X2)) → PROPER(X2)
PROPER(U22(X1, X2)) → PROPER(X1)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(pair(X1, X2)) → ACTIVE(X2)
ACTIVE(U51(X1, X2)) → ACTIVE(X1)
ACTIVE(pair(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X1)
ACTIVE(U21(X1, X2)) → ACTIVE(X1)
ACTIVE(sel(X1, X2)) → ACTIVE(X2)
ACTIVE(U81(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X1)
ACTIVE(fst(X)) → ACTIVE(X)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
ACTIVE(U62(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U31(X1, X2)) → ACTIVE(X1)
ACTIVE(U72(X1, X2)) → ACTIVE(X1)
ACTIVE(U42(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(snd(X)) → ACTIVE(X)
ACTIVE(natsFrom(X)) → ACTIVE(X)
ACTIVE(U41(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(U22(X1, X2)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X2)
ACTIVE(U61(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U71(X1, X2)) → ACTIVE(X1)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X1)
ACTIVE(U32(X1, X2)) → ACTIVE(X1)
ACTIVE(U64(X1, X2)) → ACTIVE(X1)
ACTIVE(U11(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X2)
ACTIVE(U52(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(head(X)) → ACTIVE(X)
ACTIVE(tail(X)) → ACTIVE(X)
ACTIVE(U82(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(U63(X1, X2, X3, X4)) → ACTIVE(X1)

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(pair(X1, X2)) → ACTIVE(X2)
ACTIVE(U51(X1, X2)) → ACTIVE(X1)
ACTIVE(pair(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X1)
ACTIVE(U21(X1, X2)) → ACTIVE(X1)
ACTIVE(sel(X1, X2)) → ACTIVE(X2)
ACTIVE(U81(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X1)
ACTIVE(fst(X)) → ACTIVE(X)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(U62(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
ACTIVE(U31(X1, X2)) → ACTIVE(X1)
ACTIVE(U72(X1, X2)) → ACTIVE(X1)
ACTIVE(U42(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(snd(X)) → ACTIVE(X)
ACTIVE(natsFrom(X)) → ACTIVE(X)
ACTIVE(U41(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(U22(X1, X2)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X2)
ACTIVE(U61(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U71(X1, X2)) → ACTIVE(X1)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X1)
ACTIVE(U64(X1, X2)) → ACTIVE(X1)
ACTIVE(U32(X1, X2)) → ACTIVE(X1)
ACTIVE(U11(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X2)
ACTIVE(U52(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(head(X)) → ACTIVE(X)
ACTIVE(tail(X)) → ACTIVE(X)
ACTIVE(U63(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(U82(X1, X2, X3)) → ACTIVE(X1)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
snd(mark(X)) → mark(snd(X))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U32(mark(X1), X2) → mark(U32(X1, X2))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
head(mark(X)) → mark(head(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X1), X2) → mark(U52(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U64(mark(X1), X2) → mark(U64(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
fst(mark(X)) → mark(fst(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
snd(ok(X)) → ok(snd(X))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
head(ok(X)) → ok(head(X))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x1 + 2·x2 + x3   
POL(U12(x1, x2, x3)) = 2·x1 + x2 + 2·x3   
POL(U21(x1, x2)) = x1 + x2   
POL(U22(x1, x2)) = 2·x1 + 2·x2   
POL(U31(x1, x2)) = 2·x1 + 2·x2   
POL(U32(x1, x2)) = 2·x1 + 2·x2   
POL(U41(x1, x2, x3)) = 2·x1 + 2·x2 + 2·x3   
POL(U42(x1, x2, x3)) = 2·x1 + x2 + x3   
POL(U51(x1, x2)) = x1 + 2·x2   
POL(U52(x1, x2)) = x1 + x2   
POL(U61(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + x4   
POL(U62(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(U63(x1, x2, x3, x4)) = x1 + x2 + 2·x3 + 2·x4   
POL(U64(x1, x2)) = 2·x1 + x2   
POL(U71(x1, x2)) = 2·x1 + x2   
POL(U72(x1, x2)) = x1 + x2   
POL(U81(x1, x2, x3)) = x1 + x2 + x3   
POL(U82(x1, x2, x3)) = x1 + x2 + 2·x3   
POL(active(x1)) = 2·x1   
POL(afterNth(x1, x2)) = 2·x1 + 2·x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = 2·x1   
POL(nil) = 0   
POL(ok(x1)) = 2·x1   
POL(pair(x1, x2)) = x1 + 2·x2   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   
POL(sel(x1, x2)) = 2·x1 + 2·x2   
POL(snd(x1)) = 2·x1   
POL(splitAt(x1, x2)) = x1 + 2·x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = 2·x1 + x2   
POL(tt) = 0   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
QDP
                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(mark(X)) → TOP(proper(X)) at position [0] we obtained the following new rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
QDP
                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(X)) → TOP(active(X))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(ok(X)) → TOP(active(X)) at position [0] we obtained the following new rules:

TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(U71(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(U71(tt, x0))) → TOP(mark(U72(tt, x0)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(ok(sel(x0, x1))) → TOP(mark(U41(tt, x0, x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(U71(tt, x1)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(nil)) → TOP(ok(nil))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(ok(U71(tt, x0))) → TOP(mark(U72(tt, x0)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(mark(0)) → TOP(ok(0))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(ok(sel(x0, x1))) → TOP(mark(U41(tt, x0, x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
QDP
                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(U71(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(ok(U71(tt, x0))) → TOP(mark(U72(tt, x0)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(ok(sel(x0, x1))) → TOP(mark(U41(tt, x0, x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(tail(cons(x0, x1)))) → TOP(mark(U71(tt, x1)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(ok(U71(tt, x0))) → TOP(mark(U72(tt, x0)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(ok(sel(x0, x1))) → TOP(mark(U41(tt, x0, x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = x3   
POL(U42(x1, x2, x3)) = x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = 1 + x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(ok(U71(tt, x0))) → TOP(mark(U72(tt, x0)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(mark(U41(tt, x0, x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(sel(x0, x1))) → TOP(mark(U41(tt, x0, x1)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(ok(U71(tt, x0))) → TOP(mark(U72(tt, x0)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = x3   
POL(U42(x1, x2, x3)) = x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
QDP
                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(ok(U71(tt, x0))) → TOP(mark(U72(tt, x0)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U71(tt, x0))) → TOP(mark(U72(tt, x0)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = x3   
POL(U42(x1, x2, x3)) = x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = 1 + x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = 1 + x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
QDP
                                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(take(x0, x1))) → TOP(mark(U81(tt, x0, x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(U11(tt, x0, x1)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = 1 + x3   
POL(U42(x1, x2, x3)) = 1 + x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = 1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = 1 + x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
QDP
                                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U41(tt, x0, x1))) → TOP(mark(U42(tt, x0, x1)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = 1 + x3   
POL(U42(x1, x2, x3)) = x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
QDP
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(U72(tt, x0))) → TOP(mark(x0))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U72(tt, x0))) → TOP(mark(x0))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 1   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = x3   
POL(U42(x1, x2, x3)) = x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = 1 + x2   
POL(U72(x1, x2)) = 1 + x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = 1 + x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
QDP
                                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U42(tt, x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = 1 + x3   
POL(U42(x1, x2, x3)) = 1 + x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
QDP
                                                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U31(tt, x0))) → TOP(mark(U32(tt, x0)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = 1 + x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = 1 + x3   
POL(U42(x1, x2, x3)) = 1 + x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
QDP
                                                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U12(tt, x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = 1 + x3   
POL(U12(x1, x2, x3)) = 1 + x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = 1 + x3   
POL(U42(x1, x2, x3)) = 1 + x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = 1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
QDP
                                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U11(tt, x0, x1))) → TOP(mark(U12(tt, x0, x1)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x1 + x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = x1 + x3   
POL(U42(x1, x2, x3)) = x1 + x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = 1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 1   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
                                                              ↳ QDP
                                                                ↳ QDPOrderProof
QDP
                                                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U81(tt, x0, x1))) → TOP(mark(U82(tt, x0, x1)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = x3   
POL(U42(x1, x2, x3)) = x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = 1 + x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = 1 + x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
                                                              ↳ QDP
                                                                ↳ QDPOrderProof
                                                                  ↳ QDP
                                                                    ↳ QDPOrderProof
QDP
                                                                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(head(cons(x0, x1)))) → TOP(mark(U31(tt, x0)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3)) = x3   
POL(U12(x1, x2, x3)) = x3   
POL(U21(x1, x2)) = x2   
POL(U22(x1, x2)) = x2   
POL(U31(x1, x2)) = x2   
POL(U32(x1, x2)) = x2   
POL(U41(x1, x2, x3)) = 1 + x3   
POL(U42(x1, x2, x3)) = 1 + x3   
POL(U51(x1, x2)) = x2   
POL(U52(x1, x2)) = x2   
POL(U61(x1, x2, x3, x4)) = x3 + x4   
POL(U62(x1, x2, x3, x4)) = x3 + x4   
POL(U63(x1, x2, x3, x4)) = x3 + x4   
POL(U64(x1, x2)) = x1 + x2   
POL(U71(x1, x2)) = x2   
POL(U72(x1, x2)) = x2   
POL(U81(x1, x2, x3)) = x3   
POL(U82(x1, x2, x3)) = x3   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(head(X)) → head(proper(X))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(snd(X)) → snd(active(X))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U72(mark(X1), X2) → mark(U72(X1, X2))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U71(mark(X1), X2) → mark(U71(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(U71(X1, X2)) → U71(active(X1), X2)
active(cons(X1, X2)) → cons(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(fst(X)) → fst(active(X))
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
                                                              ↳ QDP
                                                                ↳ QDPOrderProof
                                                                  ↳ QDP
                                                                    ↳ QDPOrderProof
                                                                      ↳ QDP
                                                                        ↳ QDPOrderProof
QDP

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U51(x0, x1))) → TOP(U51(proper(x0), proper(x1)))
TOP(ok(U12(x0, x1, x2))) → TOP(U12(active(x0), x1, x2))
TOP(mark(U63(x0, x1, x2, x3))) → TOP(U63(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(U61(x0, x1, x2, x3))) → TOP(U61(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U32(tt, x0))) → TOP(mark(x0))
TOP(ok(U61(tt, x0, x1, x2))) → TOP(mark(U62(tt, x0, x1, x2)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(U22(x0, x1))) → TOP(U22(active(x0), x1))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U62(x0, x1, x2, x3))) → TOP(U62(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(U51(tt, x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U42(x0, x1, x2))) → TOP(U42(proper(x0), proper(x1), proper(x2)))
TOP(mark(U31(x0, x1))) → TOP(U31(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(U81(x0, x1, x2))) → TOP(U81(active(x0), x1, x2))
TOP(ok(U52(x0, x1))) → TOP(U52(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U61(tt, x0, x1, x2)))
TOP(ok(U31(x0, x1))) → TOP(U31(active(x0), x1))
TOP(mark(U12(x0, x1, x2))) → TOP(U12(proper(x0), proper(x1), proper(x2)))
TOP(ok(U51(x0, x1))) → TOP(U51(active(x0), x1))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(U82(x0, x1, x2))) → TOP(U82(active(x0), x1, x2))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2))) → TOP(U11(active(x0), x1, x2))
TOP(ok(U62(x0, x1, x2, x3))) → TOP(U62(active(x0), x1, x2, x3))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(U11(x0, x1, x2))) → TOP(U11(proper(x0), proper(x1), proper(x2)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(U21(tt, x0)))
TOP(mark(U21(x0, x1))) → TOP(U21(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(U22(tt, x0))) → TOP(mark(x0))
TOP(ok(U63(x0, x1, x2, x3))) → TOP(U63(active(x0), x1, x2, x3))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(U41(x0, x1, x2))) → TOP(U41(proper(x0), proper(x1), proper(x2)))
TOP(mark(U22(x0, x1))) → TOP(U22(proper(x0), proper(x1)))
TOP(ok(U21(x0, x1))) → TOP(U21(active(x0), x1))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(U63(tt, x0, x1, x2))) → TOP(mark(U64(splitAt(x0, x2), x1)))
TOP(mark(U52(x0, x1))) → TOP(U52(proper(x0), proper(x1)))
TOP(ok(U61(x0, x1, x2, x3))) → TOP(U61(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(U71(x0, x1))) → TOP(U71(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U82(x0, x1, x2))) → TOP(U82(proper(x0), proper(x1), proper(x2)))
TOP(ok(U41(x0, x1, x2))) → TOP(U41(active(x0), x1, x2))
TOP(ok(U64(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U64(x0, x1))) → TOP(U64(active(x0), x1))
TOP(ok(U82(tt, x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(U81(x0, x1, x2))) → TOP(U81(proper(x0), proper(x1), proper(x2)))
TOP(mark(U72(x0, x1))) → TOP(U72(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(U21(tt, x0))) → TOP(mark(U22(tt, x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(U72(x0, x1))) → TOP(U72(active(x0), x1))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(U32(x0, x1))) → TOP(U32(active(x0), x1))
TOP(mark(U64(x0, x1))) → TOP(U64(proper(x0), proper(x1)))
TOP(ok(U51(tt, x0))) → TOP(mark(U52(tt, x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U71(x0, x1))) → TOP(U71(proper(x0), proper(x1)))
TOP(ok(U62(tt, x0, x1, x2))) → TOP(mark(U63(tt, x0, x1, x2)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(U52(tt, x0))) → TOP(mark(x0))
TOP(mark(U32(x0, x1))) → TOP(U32(proper(x0), proper(x1)))
TOP(ok(U42(x0, x1, x2))) → TOP(U42(active(x0), x1, x2))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, XS)) → mark(U12(tt, N, XS))
active(U12(tt, N, XS)) → mark(snd(splitAt(N, XS)))
active(U21(tt, X)) → mark(U22(tt, X))
active(U22(tt, X)) → mark(X)
active(U31(tt, N)) → mark(U32(tt, N))
active(U32(tt, N)) → mark(N)
active(U41(tt, N, XS)) → mark(U42(tt, N, XS))
active(U42(tt, N, XS)) → mark(head(afterNth(N, XS)))
active(U51(tt, Y)) → mark(U52(tt, Y))
active(U52(tt, Y)) → mark(Y)
active(U61(tt, N, X, XS)) → mark(U62(tt, N, X, XS))
active(U62(tt, N, X, XS)) → mark(U63(tt, N, X, XS))
active(U63(tt, N, X, XS)) → mark(U64(splitAt(N, XS), X))
active(U64(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U71(tt, XS)) → mark(U72(tt, XS))
active(U72(tt, XS)) → mark(XS)
active(U81(tt, N, XS)) → mark(U82(tt, N, XS))
active(U82(tt, N, XS)) → mark(fst(splitAt(N, XS)))
active(afterNth(N, XS)) → mark(U11(tt, N, XS))
active(fst(pair(X, Y))) → mark(U21(tt, X))
active(head(cons(N, XS))) → mark(U31(tt, N))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(U41(tt, N, XS))
active(snd(pair(X, Y))) → mark(U51(tt, Y))
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U61(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(U71(tt, XS))
active(take(N, XS)) → mark(U81(tt, N, XS))
active(U11(X1, X2, X3)) → U11(active(X1), X2, X3)
active(U12(X1, X2, X3)) → U12(active(X1), X2, X3)
active(snd(X)) → snd(active(X))
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(U21(X1, X2)) → U21(active(X1), X2)
active(U22(X1, X2)) → U22(active(X1), X2)
active(U31(X1, X2)) → U31(active(X1), X2)
active(U32(X1, X2)) → U32(active(X1), X2)
active(U41(X1, X2, X3)) → U41(active(X1), X2, X3)
active(U42(X1, X2, X3)) → U42(active(X1), X2, X3)
active(head(X)) → head(active(X))
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X1, X2)) → U52(active(X1), X2)
active(U61(X1, X2, X3, X4)) → U61(active(X1), X2, X3, X4)
active(U62(X1, X2, X3, X4)) → U62(active(X1), X2, X3, X4)
active(U63(X1, X2, X3, X4)) → U63(active(X1), X2, X3, X4)
active(U64(X1, X2)) → U64(active(X1), X2)
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U71(X1, X2)) → U71(active(X1), X2)
active(U72(X1, X2)) → U72(active(X1), X2)
active(U81(X1, X2, X3)) → U81(active(X1), X2, X3)
active(U82(X1, X2, X3)) → U82(active(X1), X2, X3)
active(fst(X)) → fst(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
U82(mark(X1), X2, X3) → mark(U82(X1, X2, X3))
U82(ok(X1), ok(X2), ok(X3)) → ok(U82(X1, X2, X3))
U81(mark(X1), X2, X3) → mark(U81(X1, X2, X3))
U81(ok(X1), ok(X2), ok(X3)) → ok(U81(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
U71(mark(X1), X2) → mark(U71(X1, X2))
U71(ok(X1), ok(X2)) → ok(U71(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
U64(mark(X1), X2) → mark(U64(X1, X2))
U64(ok(X1), ok(X2)) → ok(U64(X1, X2))
U63(mark(X1), X2, X3, X4) → mark(U63(X1, X2, X3, X4))
U63(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U63(X1, X2, X3, X4))
U62(mark(X1), X2, X3, X4) → mark(U62(X1, X2, X3, X4))
U62(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U62(X1, X2, X3, X4))
U61(mark(X1), X2, X3, X4) → mark(U61(X1, X2, X3, X4))
U61(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U61(X1, X2, X3, X4))
U52(mark(X1), X2) → mark(U52(X1, X2))
U52(ok(X1), ok(X2)) → ok(U52(X1, X2))
U51(mark(X1), X2) → mark(U51(X1, X2))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
U42(mark(X1), X2, X3) → mark(U42(X1, X2, X3))
U42(ok(X1), ok(X2), ok(X3)) → ok(U42(X1, X2, X3))
U41(mark(X1), X2, X3) → mark(U41(X1, X2, X3))
U41(ok(X1), ok(X2), ok(X3)) → ok(U41(X1, X2, X3))
U32(mark(X1), X2) → mark(U32(X1, X2))
U32(ok(X1), ok(X2)) → ok(U32(X1, X2))
U31(mark(X1), X2) → mark(U31(X1, X2))
U31(ok(X1), ok(X2)) → ok(U31(X1, X2))
U22(mark(X1), X2) → mark(U22(X1, X2))
U22(ok(X1), ok(X2)) → ok(U22(X1, X2))
U21(mark(X1), X2) → mark(U21(X1, X2))
U21(ok(X1), ok(X2)) → ok(U21(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
U12(mark(X1), X2, X3) → mark(U12(X1, X2, X3))
U12(ok(X1), ok(X2), ok(X3)) → ok(U12(X1, X2, X3))
U11(mark(X1), X2, X3) → mark(U11(X1, X2, X3))
U11(ok(X1), ok(X2), ok(X3)) → ok(U11(X1, X2, X3))
proper(U11(X1, X2, X3)) → U11(proper(X1), proper(X2), proper(X3))
proper(tt) → ok(tt)
proper(U12(X1, X2, X3)) → U12(proper(X1), proper(X2), proper(X3))
proper(snd(X)) → snd(proper(X))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(U21(X1, X2)) → U21(proper(X1), proper(X2))
proper(U22(X1, X2)) → U22(proper(X1), proper(X2))
proper(U31(X1, X2)) → U31(proper(X1), proper(X2))
proper(U32(X1, X2)) → U32(proper(X1), proper(X2))
proper(U41(X1, X2, X3)) → U41(proper(X1), proper(X2), proper(X3))
proper(U42(X1, X2, X3)) → U42(proper(X1), proper(X2), proper(X3))
proper(head(X)) → head(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X1, X2)) → U52(proper(X1), proper(X2))
proper(U61(X1, X2, X3, X4)) → U61(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U62(X1, X2, X3, X4)) → U62(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U63(X1, X2, X3, X4)) → U63(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U64(X1, X2)) → U64(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(U71(X1, X2)) → U71(proper(X1), proper(X2))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(U81(X1, X2, X3)) → U81(proper(X1), proper(X2), proper(X3))
proper(U82(X1, X2, X3)) → U82(proper(X1), proper(X2), proper(X3))
proper(fst(X)) → fst(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.